package fc.sj.study.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import fc.sj.study.Bean.TestBean;
import fc.sj.study.R;

public class Main2Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        if(savedInstanceState!=null){
            String a=savedInstanceState.getString("123");
        }

    }

    @Override
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        TestBean testBean=new TestBean();
        testBean.a="123";
        outState.putSerializable("123",testBean);
    }


}
